home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Very Best of Atari Inside
/
The Very Best of Atari Inside 1.iso
/
mint
/
mntlib43
/
mntlib
/
pipe.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-06
|
334b
|
27 lines
/*
* pipe: create a pipe
* works only under MiNT
*/
#include <osbind.h>
#include <errno.h>
#include <mintbind.h>
#include <unistd.h>
int
pipe(fd)
int *fd;
{
short mint_handle[2];
long r;
r = Fpipe(mint_handle);
if (r < 0) {
errno = (int) -r;
return -1;
}
fd[0] = mint_handle[0];
fd[1] = mint_handle[1];
return 0;
}